guint entry_pulse_timeout_id;
guint connecting_to_server : 1;
guint fetching_networks : 1;
+ guint loading : 1;
};
static void mount_volume (GtkPlacesView *view,
PROP_0,
PROP_LOCAL_ONLY,
PROP_OPEN_FLAGS,
+ PROP_LOADING,
LAST_PROP
};
g_value_set_boolean (value, gtk_places_view_get_local_only (self));
break;
+ case PROP_LOADING:
+ g_value_set_boolean (value, gtk_places_view_get_loading (self));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
/* avoid to update widgets if the operation was cancelled in finalize */
if (priv->listbox != NULL)
update_network_state (view);
+
+ priv->loading = FALSE;
+ g_object_notify_by_pspec (G_OBJECT (view), properties[PROP_LOADING]);
}
static void
priv->network_placeholder = NULL;
priv->network_header_spinner = NULL;
+ priv->loading = TRUE;
+ g_object_notify_by_pspec (G_OBJECT (view), properties[PROP_LOADING]);
+
/* Add "Computer" row */
file = g_file_new_for_path ("/");
icon = g_themed_icon_new_with_default_fallbacks ("drive-harddisk");
FALSE,
G_PARAM_READWRITE);
+ properties[PROP_LOADING] =
+ g_param_spec_boolean ("loading",
+ P_("Loading"),
+ P_("Whether the view is loading locations"),
+ FALSE,
+ G_PARAM_READABLE);
+
properties[PROP_OPEN_FLAGS] =
g_param_spec_flags ("open-flags",
P_("Open Flags"),
}
}
+/**
+ * gtk_places_view_get_loading:
+ * @view: a #GtkPlacesView
+ *
+ * Returns %TRUE if the view is loading locations.
+ *
+ * Since: 3.18
+ */
+gboolean
+gtk_places_view_get_loading (GtkPlacesView *view)
+{
+ GtkPlacesViewPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_PLACES_VIEW (view), FALSE);
+
+ priv = gtk_places_view_get_instance_private (view);
+
+ return priv->loading;
+}
+
/**
* gtk_places_view_get_local_only:
* @view: a #GtkPlacesView